-- GENERATED SPELL FOR [Mossflayer Cannibal] --


function spell0_8562(pUnit, Event) --@Drain Life,Drain--
pUnit:FullCastSpellOnTarget(17173,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_8562', 5000, 1)
end

function spell1_8562(pUnit, Event) --@Hex,n/a--
pUnit:FullCastSpellOnTarget(17172,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8562', 5297, 1)
end

function Sorts_8562(pUnit, Event)
local choix_sorts_8562 = math.random(0, 1)
if choix_sorts_8562 == 0 then
pUnit:RegisterEvent('spell0_8562', 1, 1)
end
if choix_sorts_8562 == 1 then
pUnit:RegisterEvent('spell1_8562', 1, 1)
end
end

function mob8562_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8562', math.random(1500, 3000), 1)
end

function mob8562_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8562_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8562_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8562, 1, 'mob8562_Action')
RegisterUnitEvent(8562, 2, 'mob8562_Leave')
RegisterUnitEvent(8562, 3, 'mob8562_Kill')
RegisterUnitEvent(8562, 4, 'mob8562_Die')
